<template>
  <div>
    <!-- aaa--{{val}} -->

    <slot></slot>
    <slot name="a1" :nm="name1"></slot>
    <slot name="a2" :nm="name2"></slot>
  </div>
</template>

<script>
export default {
  //   props: ["val"],
  props: {
    val: {
      validator: function (value) {
        return [1, 2, 3].indexOf(value) !== -1;
      },
    },
    /* val: {
      type: [Number, String, Object],
      required: true,
      // default:"8848",
      //   default: function(){
      //       return 12312
      //   },
    }, */
  },
  data() {
    return {
      name1: "zn",
      name2: "wn",
    };
  },
  beforeDestroy() {
    console.log("beforeDestroy");
  },
  destroyed() {
    console.log("destroyed");
  },
  methods: {
    fn() {
      return 1212;
      console.log(this.val);
    },
  },
};
</script>

<style scoped>
</style>